package com.kaifamiao.enums;

public enum Finger {
    THUMB(){
        public void introduce(){
            System.out.println( "大拇指" );
        }
    },
    INDEX_FINGER(){
        @Override
        public void introduce() {
            System.out.println( "食指" );
        }
    },
    MIDDLE_FINGER(){
        @Override
        public void introduce() {
            System.out.println( "中指" );
        }
    },
    THE_RING_FINGER(){
        @Override
        public void introduce() {
            System.out.println( "无名指" );
        }
    },
    LITTLE_FINGER(){
        @Override
        public void introduce() {
            System.out.println( "小拇指" );
        }
    };

    // 枚举中也可以有抽象方法
    public abstract void introduce();

    public static void main(String[] args) {
        System.out.println( Finger.THUMB );
        Finger f = Finger.LITTLE_FINGER;
        System.out.println( f.getClass() );
    }
}
